home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Languages / MS Fortran 5.1 / DISK6 / COLTEXT.FO$ / COLTEXT.bin
Encoding:
Text File  |  1989-01-26  |  1.3 KB  |  40 lines

  1. CC  COLTEXT.FOR - Displays text color with various color or
  2. CC                monochrome attributes.
  3.  
  4.       INCLUDE  'FGRAPH.FI'
  5.       INCLUDE  'FGRAPH.FD'
  6.  
  7.       INTEGER*2          dummy2, blink, fgd
  8.       INTEGER*4          dummy4, bgd
  9.       CHARACTER*2        str
  10.       RECORD / rccoord / curpos
  11.  
  12.       CALL clearscreen( $GCLEARSCREEN )
  13.       CALL outtext( 'Text color/monochrome attributes:' )
  14.  
  15.       DO  blink = 0, 16, 16
  16.          DO bgd = 0, 7
  17.             dummy4 = setbkcolor( bgd )
  18.             CALL settextposition( INT2( bgd ) +
  19.      +                          (( blink / 16 ) * 9) + 3, 1, curpos ) 
  20.             dummy2 = settextcolor( 15 )
  21.             WRITE (str, '(I2)') bgd
  22.             CALL outtext( 'Back:' // str // '  Fore:' )
  23. C
  24. C           Loop through 16 foreground colors.  For monochrome,
  25. C           these will be underscore and low/high intensity.
  26. C
  27.             DO fgd = 0, 15
  28.                dummy2 = settextcolor( fgd + blink )
  29.                WRITE (str, '(I2)') fgd + blink
  30.                CALL outtext( '  ' // str )
  31.             END DO
  32.          END DO
  33.       END DO
  34.  
  35.       CALL settextposition( 25, 1, curpos )
  36.       CALL outtext( 'Press ENTER to exit' )
  37.       READ (*,*)
  38.       dummy2 = setvideomode( $DEFAULTMODE )
  39.       END
  40.